import request from '@/plugin/axios'
import { getmd5 } from '@/chajian/index'
// 获取文章内容
export function getarticleCotent(val1) {
    const ss = {
        "articleId": val1,
        "sign": getmd5(String(val1))
    }
    return request({
        url: 'https://www.lovemsss.cn/bg/operateWebArticle/getArticleById',
        method: 'post',
        data: ss
    })
}

// 获取评论
export function getcommentsList(val1) {
    const ss = {
        "articleId": val1,
		"page": 1,
		"pageSize": 9999,
        "sign": getmd5(String(1))
    }
    return request({
        url: 'https://www.lovemsss.cn/bg/operateWebArticle/pageListComment',
        method: 'post',
        data: ss
    })
}

// 发表评论
export function setComments(val) {
    const ss = {
        "content": val.content,
		"parentId": 0,
		"articleId": val.articleId,
        "sign": getmd5("jhjj"+String(val.articleId))
    }
    return request({
        url: 'https://www.lovemsss.cn/bg/operateWebArticle/addComment',
        method: 'post',
        data: ss
    })
}